package com.kh.pajx.sop.view.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.kh.pajx.sop.domain.ClassInfo;
import com.kh.pajx.sop.service.IClassInfoService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 班级信息控制器
 * @author:	azzcsimp
 * @Createdate:	2014年8月18日 上午11:26:49
 */
@Controller
@Scope("prototype")
public class ClassAction extends ActionSupport {
	
	private static final long serialVersionUID = -5796004192308325051L;
	
	@Resource
	private IClassInfoService classInfoSerivce;
	
	private String graId;
	
	/** 班级信息 */
	public String list(){
		try {
			List<ClassInfo> classInfoList = classInfoSerivce.findClassInfo(graId);
			ActionContext.getContext().put("classInfoList", classInfoList);
			return "list";
		} catch (Exception e) {
			e.printStackTrace();
			return "null";
		}
	}

	public String getGraId() {
		return graId;
	}

	public void setGraId(String graId) {
		this.graId = graId;
	}
	
	


}
